import 'package:graphql_flutter/graphql_flutter.dart';

class FileGQL {
  // 查询文件下载URL的GraphQL查询
  static const String fetchFileDownloadUrl = r'''
query MyQuery(
  $bucketName: String
  $objectName: String
  $expiresInSeconds: Int
) {
  file {
    getFileDownloadUrl(
      bucketName: $bucketName
      objectName: $objectName
      expiresInSeconds: $expiresInSeconds
    ) {
      expiresInSeconds
      url
    }
  }
}
  ''';

  // 获取文件上传URL的GraphQL查询
  static const String fetchUploadLink = r'''
query MyQuery(
  $objectName: String
  $expiresInSeconds: Int
  $bucketName: String
) {
  file {
    getFileUploadUrl(
      objectName: $objectName
      bucketName: $bucketName
      expiresInSeconds: $expiresInSeconds
    ) {
      expiresInSeconds
      url
    }
  }
}
  ''';
}